<div class="refentry" lang="en" xml:lang="en"><a id="glXQueryDrawable"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXQueryDrawable — returns an attribute assoicated with a GLX drawable</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">int <b class="fsfunc">glXQueryDrawable</b>(</code></td><td>Display *  </td><td><var class="pdparam">dpy</var>, </td></tr><tr><td> </td><td>GLXDrawable  </td><td><var class="pdparam">draw</var>, </td></tr><tr><td> </td><td>int  </td><td><var class="pdparam">attribute</var>, </td></tr><tr><td> </td><td>unsigned int *  </td><td><var class="pdparam">value</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>dpy</code></em></span></dt><dd><p>
                    Specifies the connection to the X server.
                </p></dd><dt><span class="term"><em class="parameter"><code>draw</code></em></span></dt><dd><p>
                    Specifies the GLX drawable to be queried.
                </p></dd><dt><span class="term"><em class="parameter"><code>attribute</code></em></span></dt><dd><p>
                    Specifies the attribute to be returned.  Must be one of
                    <code class="constant">GLX_WIDTH</code>,
					<code class="constant">GLX_HEIGHT</code>,
					<code class="constant">GLX_PRESERVED_CONTENTS</code>,
					<code class="constant">GLX_LARGEST_PBUFFER</code>, or
					<code class="constant">GLX_FBCONFIG_ID</code>.
                </p></dd><dt><span class="term"><em class="parameter"><code>value</code></em></span></dt><dd><p>
                    Contains the return value for
					<em class="parameter"><code>attribute</code></em>.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glXQueryDrawable</code> sets
			<em class="parameter"><code>value</code></em> to the value of
			<em class="parameter"><code>attribute</code></em> with respect to the GLXDrawable
			<em class="parameter"><code>draw</code></em>.
		</p><p>
            <em class="parameter"><code>attribute</code></em> may be one of the following:
        </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GLX_WIDTH</code></span></dt><dd><p>
                        Returns the width of <em class="parameter"><code>ctx</code></em>.
                    </p></dd><dt><span class="term"><code class="constant">GLX_HEIGHT</code></span></dt><dd><p>
                        Returns the height of <em class="parameter"><code>ctx</code></em>.
                    </p></dd><dt><span class="term"><code class="constant">GLX_PRESERVED_CONTENTS</code></span></dt><dd><p>
                        Returns <code class="constant">True</code> if the contents
						of a GLXPbuffer are preserved when a resource
						conflict occurs; <code class="constant">False</code> otherwise.
                    </p></dd><dt><span class="term"><code class="constant">GLX_LARGEST_PBUFFER</code></span></dt><dd><p>
                        Returns the value set when
                        <code class="function">glXCreatePbuffer</code> was called to
                        create the GLXPbuffer. If
                        <code class="constant">False</code> is returned, then the
                        call to <code class="function">glXCreatePbuffer</code> will
                        fail to create a GLXPbuffer if the requested size
                        is larger than the implementation maximum or
                        available resources.  If <code class="constant">True</code>
                        is returned, a GLXPbuffer of the maximum availble
                        size (if less than the requested width and height)
                        is created.
                    </p></dd><dt><span class="term"><code class="constant">GLX_FBCONFIG_ID</code></span></dt><dd><p>
					    Returns the XID for <em class="parameter"><code>draw</code></em>.
					</p></dd></dl></div><p>
            If <em class="parameter"><code>draw</code></em> is a GLXWindow or GLXPixmap and
            <em class="parameter"><code>attribute</code></em> is set to
            <code class="constant">GLX_PRESERVED_CONTENTS</code> or
            <code class="constant">GLX_LARGETST_PBUFFER</code>, the contents of
            <em class="parameter"><code>value</code></em> are undefined.  If
            <em class="parameter"><code>attribute</code></em> is not one of the attributes
            listed above, the contents of <em class="parameter"><code>value</code></em> are
            unedfined.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            A <code class="constant">GLXBadDrawable</code> is generated if
			<em class="parameter"><code>draw</code></em> is not a valid GLXDrawable.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
		    <a class="citerefentry" href="glXCreateWindow"><span class="citerefentry"><span class="refentrytitle">glXCreateWindow</span></span></a>,
			<a class="citerefentry" href="glXCreatePixmap"><span class="citerefentry"><span class="refentrytitle">glXCreatePixmap</span></span></a>,
			<a class="citerefentry" href="glXCreatePbuffer"><span class="citerefentry"><span class="refentrytitle">glXCreatePbuffer</span></span></a>,
			<a class="citerefentry" href="glXGetFBConfigAttrib"><span class="citerefentry"><span class="refentrytitle">glXGetFBConfigAttrib</span></span></a>,
			<a class="citerefentry" href="glXChooseFBConfig"><span class="citerefentry"><span class="refentrytitle">glXChooseFBConfig</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
